Test/comprehensive unit tests 13#397
Merged
Merged
Conversation
Add comprehensive unit tests covering: - Client/Upgrade mutual upgrade integration (ProcessInfo IPC, version chain, forcibly update) - Differential upgrade full cycle (Clean/Dirty, binary files, nested directories, mixed operations) - Event notification pipeline (all 7 event types, push upgrade simulation, multiple listeners) - Parameter matrix combinations (UpdateOptions, Configinfo validation, auth schemes, blacklists) - Real-world developer usage scenarios (minimal setup, full production chain, fluent API) - StorageManager backup/restore tests - PipelineContext and DiffPipeline tests Results: CoreTest 111/112 pass, DifferentialTest 23/23 pass, ClientCoreTest 115/115 pass
- Rebase on origin/master (merged project structure) - Fix all namespace references to GeneralUpdate.Core.* - Fix API changes: AppType enum, UpdateOptions, BlackListManager - Fix copilot suggestions: encoding, tautology, mutations, unused vars - Fix AddCustomOption empty list and Precheck callback tests Results: CoreTest 165p, DifferentialTest 85p, ClientCoreTest 42p
… model tests - BootstrapHooksAndExtensionsTests: Hook lifecycle (5 methods), RejectingHooks, UpdateContext/DownloadContext models, UpdateReport/UpdateEvent, IUpdateEventListener (8 methods), Security schemes - BootstrapFullParameterMatrixTests: ALL 42 UpdateOptions constants with type coverage, 6 combination chains (all 33 options, silent client, parallel diff, upgrade no backup, full security) - ConfigurationModelsTests: BlackListConfig, HubConfig, DownloadAsset, DownloadPlan, DownloadProgress, DownloadResult, all 9 enum types, UpdateOption<T> value semantics Results: CoreTest 283p/3f(pre-existing), all new tests pass
- Chain_ClientAndUpgrade_BothFullyConfigured: production deployment with Client and Upgrade bootstraps configured simultaneously with ALL non-conflicting parameters (30+ options each), hooks, listeners, extensions. Verifies independent instances. - Chain_ClientAndUpgrade_CompleteDeveloperWorkflow: real-world developer flow showing complete API surface for both roles in a single method
…s, CustomOptions, ClientCoreTest)
… to fix flaky test
Contributor
There was a problem hiding this comment.
Pull request overview
This PR primarily updates test-suite wording/formatting and adjusts backup cleanup behavior in StorageManager to sort backup directories by version name rather than filesystem creation time.
Changes:
- Replaced garbled “??” separators in integration test comments/regions with an em dash for readability.
- Added
System.Linqimport to support LINQ usage inParameterMatrixAndEventTests. - Changed
StorageManager.CleanBackupto order backup directories byVersionparsed from directory name (descending) before deleting older entries.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/DifferentialTest/DifferentialUpgradeIntegrationTests.cs | Comment/region header text cleanup (separator character replacement). |
| tests/CoreTest/Bootstrap/ParameterMatrixAndEventTests.cs | Adds System.Linq for existing LINQ usage in the test file. |
| src/c#/GeneralUpdate.Core/FileSystem/StorageManager.cs | Changes backup cleanup ordering from CreationTime to parsed Version ordering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+308
to
+312
| .OrderByDescending(d => | ||
| { | ||
| var name = d.Name; | ||
| return Version.TryParse(name, out var v) ? v : new Version(0, 0); | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.